//
//  Utilization.h
//  lc
//
//  Created by Henry Pang on 2/23/14.
//  Copyright (c) 2014 Sita Tech. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Constants.h"
#import <UIKit/UIKit.h>


@class AppDelegate;
@class NSXMLElement;
@class LKDBHelper;

typedef void (^RevealBlock)();

@interface Utilization : NSObject {
    @private RevealBlock _revealBlock;
}

#pragma mark - NSUserDefaults

#pragma mark - identifier dictionary

//+ (NSString*) getViewControllerIdentifier:(LCPaneViewControllerType) paneViewControllerType;

//For LC internal view controller type
+ (NSString*) getSubViewControllerIdentifier:(LCSubPaneViewControllerType) paneViewControllerType;
+ (NSString*) getPlistDictionaryIdentifier:(LCPlistDictionaryType) plistDictionaryType;
+ (NSString*) getFolerDirectoryIdentifier:(LCFolerDirectoryType) folerDirectoryType;

//获取用户头像路径
+ (NSString*) getDocPathAndAccountid;

#pragma mark - for View Controllers
// get the appDelegate
+(AppDelegate *)appDelegate;
//+ (void)transitionToPaneViewController:(MSDynamicsDrawerViewController*) dynamicsDrawerViewController paneViewControllerType:(LCPaneViewControllerType)paneViewControllerType;

#pragma mark - for plist handles

// Path handles
+ (id) dictionaryArrayFromPlist:(LCSandboxPathType) sandboxPathType folder:(NSString *)folder plistDictionaryType:(LCPlistDictionaryType)plistDictionaryType;
+ (NSString *)sandBoxPath:(LCSandboxPathType) sandboxPathType;

+ (id)getDictionaryArrayByPlistType:(LCPlistDictionaryType) plistDictionaryType;

#pragma mark - for Xmpp

// xml message maker
+ (NSXMLElement *) makeXmppMessage:(NSString *)type fromUser:(NSString *)fromUser toUser:(NSString *)toUser msgBody:(NSString *)msgBody;

#pragma mark - for Json

+(NSString*)formatUserDataForUpload:(NSDictionary*) userData;


#pragma mark - for DB
+ (BOOL) isDBEncrypted;
+ (void) setDBEncrypted:(BOOL) isDBEncrypted;
+ (NSString *) getDBEncryptKey;
+ (void) setDBEncryptKey:(NSString *) encryptKey;
+ (LKDBHelper *) getUsingLKDBHelper;
+ (void)destroyLKDBHelper;
+ (NSString *) getDBPathWithName;
//+ (LKDBHelper *) getUsingLKDBHelperForUnencrypted;
+ (NSString *) getDBPathWithNameForUnencrypted;

#pragma mark - for random
+ (NSInteger) random_integer:(NSInteger) maxValue;
+ (NSString*) random_char;
+ (NSString *) random_string:(NSInteger) length;


//+ (UIImage *)createImageWithColor:(UIColor *)color;
//+ (UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size;
@end
